package org.example.kg_back.controller;


import org.example.kg_back.common.result.Result;
import org.example.kg_back.service.AirLineService;
import org.example.kg_back.service.imp.TimeTaskService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping("/api/airLine")
public class AirLineController {

	@Autowired
	private AirLineService service;

	//获取所有航线
	@GetMapping("/findAll")
	public Result<?> findAll(){
		return Result.success(service.findAll());
	}

	//获取从青岛起飞航班数前十的航线
	@GetMapping("/findByLimit")
	public Result<?> findByLimit(){
		return Result.success(service.findBylimit());
	}

	//查询总航线数
	@GetMapping("/findLineCount")
	public Result<?> findLineCount(){
		return Result.success(service.findLineCount());
	}

}
